Previously, as a machine tool having at least one rotation axis for turning a table to which a workpiece is fixed, a numerical control device has been known which has a plurality of linear axes and a single table rotation axis, and further has at least one table rotation axis or at least one tool swinging axis. For example, as represented in FIG. 1, a five-axis machine tool has been known in which, in addition to a tool 2 being driven by three linear axes as the X, Y, and Z axes perpendicular to each other, the tool 2 is rotationally controlled by a rotation axis B around the Y axis, and a table 1 is controlled by a rotation axis C around the Z axis, whereby, a workpiece 3 fixedly mounted on the table 1 is machined.
In a machine tool having at least one table rotation axis, a case may occur in which, in order to ensure the tool moving relative to a workpiece rotated by turn of the table based on a path and speed commanded by a machining program, the tool is moved in a coordinate system different from a machine coordinate system previously set for the machine tool. For example, in a TCP (tool center point) control method where the path and speed commanded by the machining program and the path and speed of a TCP (edge position of the tool) with respect to the workpiece are controlled to be coincident with each other, the tool is moved in a table coordinate system that rotates with the turn of the table to which workpiece is fixed, or in a work coordinate system that does not rotate with the turn of the table, in addition to in the machine coordinate system.
For example, a TCP control method is disclosed in Patent Document 1 in which, by an interpolation in the table coordinate system, a workpiece is linearly machined.
Generally, in a numerical control device, in accordance with a machining program written using a command code called as G-code, a command is given to a servo amplifier for turning a servo motor that drives an X, Y, Z, B, and C axis, etc. An operation commanded by the machining program includes two kinds of operations: a machining operation and an operation other than the machining operation (hereinafter referred to as a non-machining operation). The machining operation includes an operation that the tool directly cut-machines a workpiece, while the non-machining operation includes, for example, operations of positioning the table turn axis for positioning the workpiece, moving the tool to a position at which a hole is drilled through the workpiece, and approaching the tool to the workpiece.
The following program is an example of a non-machining operation command for the TCP control, which represents a command, in order to determine the opposite-side face of the workpiece, for positioning the C-axis in the table coordinate system. Here, to simplify the explanation, machining commands, such as for a cutting operation, etc., are not represented. The position of the C-axis as the table rotation axis is assumed to be previously set at 0 degree.